import { config } from 'setting'
import { request } from 'utils'
const { call = {} } = config
const developer = call.lyq || ''
const { api } = config
const { codeList,selectData } = api

export function queryList (params) {
  return request({
    url: codeList,
    method: 'get',
    data: params,
  })
}

export function codeSelect (params) {
  return request({
    url: selectData,
    method: 'get',
    data: params,
  })
}

// 修改
export function patch (id,values) {
  return request({
    url:`${developer}/updateDetailsStatecode`,
    method: 'post',
    data:{
      param:{id,values},
    },
  })
}
// 新建
export function create (values) {
  return request({
    url:`${developer}/createDetailsStatecode`,
    method: 'post',
    data:{
      param:values,
    },
  })
}
// 删除
export function remove (id,user_name) {
  return request({
    url:`${developer}/deleteDetailsStatecode`,
    method: 'post',
    data:{
      param:{id,user_name},
    },
  })
}